//
//  CreditCardCollectionViewCell.m
//  联付商圈
//
//  Created by apple on 17/7/22.
//  Copyright © 2017年 lianfu. All rights reserved.
//

#import "CreditCardCollectionViewCell.h"

@implementation CreditCardCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.horizontalLineView = [[UIView alloc] init];
        self.horizontalLineView.backgroundColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1.00];
        [self addSubview:_horizontalLineView];
        [self.horizontalLineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_offset(UIEdgeInsetsMake(0, 0, frame.size.height - 1.5 * FONTSIZE, 0));
        }];
        
        self.verticalLineView = [[UIView alloc] init];
        self.verticalLineView.backgroundColor = self.horizontalLineView.backgroundColor;
        [self addSubview:_verticalLineView];
        [self.verticalLineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_offset(UIEdgeInsetsMake(0, frame.size.width - 1.5 * FONTSIZE, 0, 0));
        }];
        
        self.bankLogo = [[UIImageView alloc] init];
        [self addSubview:_bankLogo];
        [self.bankLogo mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(10 * FONTSIZE);
            make.top.equalTo(self.mas_top).offset(25 * FONTSIZE);
            make.bottom.equalTo(self.mas_bottom).offset(-25 * FONTSIZE);
            make.width.mas_offset(40 * FONTSIZE);
        }];
        
        self.bankName = [[UILabel alloc] init];
        self.bankName.font = [UIFont systemFontOfSize:17 * FONTSIZE];
        [self addSubview:_bankName];
        [self.bankName mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_bankLogo.mas_right).offset(10 * FONTSIZE);
            make.top.equalTo(self.mas_top).offset(17 * FONTSIZE);
            make.right.equalTo(self.mas_right).offset(-30 * FONTSIZE);
            make.height.mas_offset(25 * FONTSIZE);
        }];
        
        self.activityTxt = [[UITextView alloc] init];
        self.activityTxt.font = [UIFont systemFontOfSize:12 * FONTSIZE];
        self.activityTxt.textColor = [UIColor colorWithWhite:0.4 alpha:1.0];
        [self addSubview:_activityTxt];
        [self.activityTxt mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_bankLogo.mas_right).offset(5 * FONTSIZE);
            make.top.equalTo(_bankName.mas_bottom).offset(-5 * FONTSIZE);
            make.right.equalTo(self.mas_right).offset(-5 * FONTSIZE);
            make.height.mas_offset(40 * FONTSIZE);
        }];
        
        self.bankLogo.backgroundColor = [UIColor redColor];
    }
    return self;
}
@end
